<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>管理后台</title>
    <link rel="stylesheet" href="styles.css">
</head>
<body>
    <div class="welcome-message" id="welcome-message"></div>
    <header>
        <h1>管理后台</h1>
        <nav>
            <button id="exit-button">退出</button>
        </nav>
    </header>
    <main>
        <p>这里是登录后的欢迎页面。</p>
    </main>
    <footer>
        <p>&copy; 2025 我的博客</p>
    </footer>
    <script>
        document.addEventListener('DOMContentLoaded', function() {
            const urlParams = new URLSearchParams(window.location.search);
            const username = urlParams.get('username');
            if (username) {
                document.getElementById('welcome-message').innerText = `欢迎${username}回来`;
            }
 
            const exitButton = document.getElementById('exit-button');
            exitButton.addEventListener('click', function() {
                window.location.href = 'index.html';
            });
        });
    </script>
</body>
</html>